/****************************************************************************
 Copyright (c) 2012-2012 lijiejun
 Copyright (c) 2010-2012 cocos2d-x.org
 Copyright (c) 2008-2010 Ricardo Quesada
 Copyright (c) 2011      Zynga Inc.
 
 http://www.cocos2d-x.org
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:
 
 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.
 
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
 ****************************************************************************/

package org.cocos2d.support
{
	import flash.display3D.Context3DBlendFactor;
	
	import org.cocos2d.cocoa.CCPoint;
	import org.cocos2d.cocoa.CCRect;
	import org.cocos2d.cocoa.CCSize;
	
	public class ccMacros
	{
		public static function CC_DEGREES_TO_RADIANS(angle : Number) : Number
		{
			return angle * 0.01745329252;
		}
		
		public static function CC_RADIANS_TO_DEGREES(angle : Number) : Number
		{
			return angle * 57.29577951;
		}
		
		public static function CC_RECT_POINTS_TO_PIXELS(rect : CCRect) : CCRect
		{
			// no retina display support on flash platform
			return rect;
		}
		
		public static function CC_RECT_PIXELS_TO_POINTS(rectInPixels : CCRect) : CCRect
		{
			return rectInPixels;
		}
		
		public static function CC_POINT_PIXELS_TO_POINTS(pixels : CCPoint) : CCPoint
		{
			return pixels;
		}
		
		public static function CC_POINT_POINTS_TO_PIXELS(points : CCPoint) : CCPoint
		{
			return points;
		}
		
		public static function CC_SIZE_PIXELS_TO_POINTS(size : CCSize) : CCSize
		{
			return size;
		}
		
		public static const CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL : Boolean = false;
		
		public static const FLT_EPSILON : Number = 1.192092896e-07;
		
		public static var CC_BLEND_SRC : String = Context3DBlendFactor.ONE;
		public static var CC_BLEND_DST : String = Context3DBlendFactor.ONE_MINUS_SOURCE_ALPHA;
	}
}